package models

import "gorm.io/gorm"

type Configs struct {
	gorm.Model
	Name     string `json:"name" form:"name" gorm:"type:varchar(500);not null;unique;comment:'名称'" binding:"required"`
	CID      string `json:"cid" form:"cid" gorm:"type:varchar(500);not null;unique;comment:'集群ID'"`
	Text     string `json:"text" form:"text" gorm:"type:text;not null;comment:'config文件内容'" binding:"required"`
	Version  string `json:"version" form:"version" gorm:"type:text;not null;comment:'集群版本'"`
	Status   uint   `gorm:"type:tinyint(1);default:0;comment:'状态(正常/禁用, 默认正常) 1离线，0表在线'" json:"status"`
	CreateBy string `gorm:"column:create_by;comment:'创建来源'" json:"create_by" form:"create_by"`
}

type ClusterK8sList struct {
	Items []*Configs `json:"items"`
	Total int64      `json:"total"`
}
